default: all
all: networking-p agent-p collector-p viewer-all-p

collector-p: networking-p
	make -C collector/build

agent-p: networking-p
	make -C agent/build

.PHONY: viewer-p
viewer-p: networking-p
	cd viewer; ./make.sh

.PHONY: viewer-all-p
viewer-all-p: networking-p
	cd viewer; ./make.sh all

networking-p:
	cd ./networking/build; ./make.sh

clean:
	@make -C collector/build clean
	@make -C agent/build clean
	@cd networking/build; make clean
	@cd viewer; ./make.sh clean

pack:
	rm -f agent.tar collector.tar
	tar -cf agent.tar agent/
	tar -cf collector.tar collector/

put:
	scp collector.tar "root@31.186.97.223:"
	ssh root@31.186.97.223 "tar -xf collector.tar"
